<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
{% extends 'learning_logs/base.html' %}
{% block content %}
    <p>Add a new topic:</p>
    <form action="{% url 'learning_logs:new_topic' %}" method="post">
{#    防止攻击者利用表单来获得对服务器未经授权的访问，即预防跨站请求伪造#}
        {% csrf_token %}
{#        自动显示表单所需的全部字段#}
        {{ form.as_p }}
        <button name="submit">Add topic</button>
    </form>
{% endblock content %}

</body>
</html>